import axios from 'axios';

// 添加政策;
export function addPolicy(data) {
  return axios.post('/policy/add', data);
}

// 政策详列表
export function getAllpolicy(data: any) {
  return axios.get('/policy/index', {
    params: data,
  });
}

// 政策详情
export function policyDetail(data: any) {
  return axios.get('/policy/detail', {
    params: data,
  });
}

// 编辑政策
export function editPolicy(date: any) {
  return axios.post('/policy/edit', date);
}

//删除政策
export function deletePolicy(data: any) {
  return axios.post('/policy/delete', data);
}

//省份
export function getGeoProvice(data: any) {
  return axios.get('/global/geo/province', {
    params: data,
  });
}
//市
export function getgeocity(data: any) {
  return axios.get('/global/geo/city', {
    params: data,
  });
}
//区县
export function getgeoarea(data: any) {
  return axios.get('/global/geo/area', {
    params: data,
  });
}

//政策统计
export function getstalist(data: any) {
  return axios.get('/policy/sta', {
    params: data,
  });
}

// 政策地图展示
export function getpolicyEcharts(data: any) {
  return axios.get('/policy/province_policy', {
    params: data,
  });
}

export function getpolicyNumer(date: any) {
  return axios.post('/global/ai/cate', date);
}
